package com.itheima.controller;

import domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * @Description:
 * @Version: V1.0
 */



@Controller
@RequestMapping("/u")
public class UsersControllerTest {


    @RequestMapping("/user1")
    public String user1(String name,Integer age ){

        System.out.println("name"+name+"age"+age);

        return "/page.jsp";

    }

    @RequestMapping("/user2")
    public String user2(User u){

        System.out.println(u.toString());
        return "/page.jsp";

    }


    @RequestMapping("/user3")
    public String user3(User u){
        System.out.println(u.toString());
        return "/page.jsp";

    }

    @RequestMapping("/user4")
    public String user4(User u){
        System.out.println(u.toString());
        return "/page.jsp";
    }
    @RequestMapping("/user5")
    public String user5(@RequestParam("usernam") String name){
        System.out.println(name);
        return "/page.jsp";

    }
    @RequestMapping("/user6")
    public String user6(Date date){
        System.out.println(date);
        return "page.jsp";
    }
}
